def file = new File('sample.md')

int wordCount = 0
def words = []

println '-' * 32
file.eachLine { line -> 
	line.tokenize().each { word -> 
		wordCount++
		println word
	}
}

println "total words: $wordCount"
println words
